package com.example.devicemanage;

import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.GpsSatellite;
import android.location.GpsStatus;
import android.location.Location;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;

import com.google.android.material.textfield.TextInputEditText;
import com.tamsiree.rxkit.RxLocationTool;
import com.tamsiree.rxkit.view.RxToast;

import java.text.BreakIterator;
import java.util.Iterator;

public class Remove extends AppCompatActivity {
    static final int PICK_CONTACT_REQUEST = 1;
    LocationManager locationManager;
    BreakIterator mGpsCount;
    Context mContext;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_remove);
        setTitle("拆除数据录入");
    }


    @Override
    protected void onResume() {
        super.onResume();

    }


    public void openRemove(View view) {
        Intent intent = new Intent(Remove.this, ActivityScanerCode.class);
        startActivityForResult(intent, PICK_CONTACT_REQUEST);

    }

    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (requestCode == PICK_CONTACT_REQUEST) {
            // Make sure the request was successful
            if (resultCode == RESULT_OK) {
                String barcode = data.getStringExtra("barcode");
                TextInputEditText textInputEditText = this.findViewById(R.id.textInputEditText);
                textInputEditText.setText(barcode);
            }
        }

    }



}


